<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>梦幻西游</title>
    <style>
        * {
            margin: 0;
            padding: 0;
            list-style: none;
        }
        /* 背景图片高度 */
        html, body, .back {
            height: 100%;
        }
        .back {
            background: url(./mhxy-image/background.jpg);
            animation: back 30s linear infinite;
        }

        /* 师徒四人 */
        .view {
            width: 830px;
            height: 240px;
            /* border: 1px solid red; */
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            margin: 300px auto;
        }
        .view div {
            float: left;
            margin-right: 10px;
            overflow: hidden;
        }
        .wk , .bj {
            width: 200px;
            height: 180px;
        }
        /* 使用动画 */
        .wk img, .bj img {
            animation: wk 1s steps(8) infinite;
        }

        .ts {
            width: 170px;
            height: 240px;
        }
        /* 使用动画 */
        .ts img {
            animation: ts 1s steps(8) infinite;
        }

        .ss {
            width: 210px;
            height: 200px;
        }
        /* 使用动画 */
        .ss img {
            animation: ss 1s steps(8) infinite;
        }
        /* 背景动画 */
        @keyframes back {
            from {
                margin-left: -1920px;
            }
            to {
                margin-left: 0;
            }
        }

        /* 悟空八戒动画 */
        @keyframes wk {
            from {
                margin-left: 0;
            }
            to {
                margin-left: -1600px;
            }
        }

        /* 唐僧动画 */
        @keyframes ts {
            from {
                margin-left: 0;
            }
            to {
                margin-left: -1360px;
            }
        }

        /* 沙僧动画 */
        @keyframes ss {
            from {
                margin-left: 0;
            }
            to {
                margin-left: -1680px;
            }
        }

    </style>
</head>
<body>
    <!-- 背景图片 -->
    <div class="back"></div>

    <!-- 师徒四人 -->
    <div class="view">
        <div class="wk">
            <img src="./mhxy-image/wk.png" alt="">
        </div>
        <div class="bj">
            <img src="./mhxy-image/bj.png" alt="">
        </div>
        <div class="ts">
            <img src="./mhxy-image/ts.png" alt="">
        </div>
        <div class="ss">
            <img src="./mhxy-image/ss.png" alt="">
        </div>
    </div>
</body>
</html>